#pragma once

#include <QtWidgets/QDialog>
#include "GeneratedFiles/ui_draw_flag.h"

class DrawFlagModel;
class FstMainMap;

class DrawFlagDialog : public QDialog
{
    Q_OBJECT
public:
    DrawFlagDialog(QWidget *parent = 0);

    void drawFlag(QPainter& painter, FstMainMap* mapInstance);
public slots:
    void AddData();
    void DeleteData();
    void SaveDatas();
    void onMousePressEvent(QMouseEvent *event, QPointF geoPos);

private:
    void initTable();
    void getAllDatasByConfig();

private:
    Ui::DrawFlagForm ui;

    DrawFlagModel *m_DrawFlag_model;
    QItemSelectionModel *m_DrawFlag_select_model;

    QImage image_;
    int image_width_;
    int image_height_;
};
